import 'package:flutter/material.dart';
import 'package:flutter_widgets/Widgets/over_lay.dart';

class WillPopScopPage extends StatefulWidget {
  @override
  _WillPopScopPageState createState() => _WillPopScopPageState();
}

class _WillPopScopPageState extends State<WillPopScopPage> {
  @override
  Widget build(BuildContext context) {
    return WillPopScope(
        onWillPop: () async {
          Toast.show(context: context,message: 'WillPopScope');
          return true;
        },
        child: Scaffold(
          appBar: AppBar(),
          body: Container(
          alignment: Alignment.center,
          child: Text("WillPopScope"),
        ),)
    );
  }
}